﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SD007
{
    public class PropertyAbstraction : VariableAbstraction
    {
        public PropertyAbstraction(string name, string typeName)
            : base(name, typeName)
        {
        }

        private bool isGetter;

        public bool IsGetter
        {
            get { return isGetter; }
            set { isGetter = value; }
        }

        public override bool Equals(object obj)
        {
            PropertyAbstraction propCompared = (PropertyAbstraction)obj;
            return ((propCompared.IsGetter == this.IsGetter)
                    && propCompared.Name == this.Name
                    && propCompared.TypeName == this.TypeName
                    && propCompared.OwnerType == this.OwnerType
            );           
        }
    }
}
